
import { computed, ref, reactive } from 'vue';
import { Pagination } from '@/types/global';
import type { TableColumnData, TableData } from '@arco-design/web-vue/es/table/interface';

const fmodel:any = {
  subjectName: '',
};

export const formModel = ref(fmodel);

export const pagination: Pagination = reactive({
  current: 1,
  pageSize: 20,
});

export const columns = computed<TableColumnData[]>(() => [
  {
    title: '考试编号',
    dataIndex: 'examId',
    width: 100,
    fixed: 'left',
  },
  {
    title: '考试代码',
    dataIndex: 'examCode',
  },
  {
    title: '考试名称',
    dataIndex: 'examName',
  },
  {
    title: '语言代码',
    dataIndex: 'languageCode',
  },
  {
    title: '总分',
    dataIndex: 'totalScore',
  },
  {
    title: '时间限制',
    dataIndex: 'totalTimeLimit',
  },
  {
    title: '题目数量',
    dataIndex: 'totalProblemQuantity',
  },
  {
    title: '创建人',
    dataIndex: 'creatorName',
  },
  {
    title: '是否启用',
    dataIndex: 'enabled',
    slotName: 'enable',
  },
  {
    title: '操作',
    slotName: 'operations',
    width: 120,
    align: 'center',
    fixed: 'right',
  },
]);
